import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/Home.vue'
import Index from '@/pages/index/Index.vue'
import Current from '@/pages/current/Current.vue'
import Introduce from '@/pages/introduce/Introduce.vue'
import Remember from '@/pages/remember/Remember.vue'
import LoginLog from '@/pages/personal/LoginLog.vue'
import PersonalInfo from '@/pages/personal/PersonalInfo.vue'
import Select from '@/pages/current/Select.vue'
// 为什么要使用路由呢？因为我们要做单页面应用。地址里面带个#，这就是典型的哈希模式
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/index',
      name: 'List',
      component: Index,
      children: [
        {
          path: '/current',
          name: 'Current',
          component: Current
        },
        {
          path: '/select',
          name: 'Select',
          component: Select
        },
        {
          path: '/introduce',
          name: 'Introduce',
          component: Introduce
        },
        {
          path: '/remember',
          name: 'Remember',
          component: Remember
        },
        {
          path: '/personalInfo',
          name: 'PersonalInfo',
          component: PersonalInfo
        },
        {
          path: '/loginLog',
          name: 'LoginLog',
          component: LoginLog
        }
      ]
    }
  ]
})
